home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / comm / comm1 / cnetmlls.lha / milles / CNetMilles.Update < prev   
Text File  |  1997-01-12  |  3KB  |  69 lines

  1. /**************************************************************************\
  2.    $VER: Mille Bornes Update, v1.13 (12-Jan-97) by Dotoran of Frontiers!
  3. \**************************************************************************/
  4. options results;signal on SYNTAX;signal on ERROR;signal on IOERR
  5. ver=word(sourceline(2),5);a=word(sourceline(2),6);parse var a "("vdate")"
  6. tr=transmit;se=sendstring;gc=getchar;gu=getuser;gs=getscratch;mg=maygetchar
  7. a='rexxsupport.library';if ~show('l',a) then if ~addlib(a,0,-30) then exit
  8.  
  9. /* NOTE: Do NOT run this file if using v1.11 or v1.12 presently! */
  10.  
  11. tr "f1@4n1CNet Mille Bornes, Update, "ver" last modified: "vdate"n1"
  12.  
  13. se "   This update adds the `Game Speed' variable to all SAVED GAME files, "
  14. tr "as well as adding the `Amiga Plays Extension' decision...n1"
  15.  
  16. tr "   You should ONLY run this script if using v1.10 Mille Bornes!n1"
  17.  
  18. se "Continue? [No]: ";gc;a=result;if a~="Y" then do;tr "No";exit;end;else tr "Yes"
  19.  
  20. tr "list mail:users/#?/_milles(1|2|3|4|5) lformat %P%N >ram:Milles"
  21.  
  22. address command "list mail:users/#?/_milles(1|2|3|4|5) lformat %P%N >ram:Milles"
  23.  
  24. tr "n1Reading from the `ram:Milles' file created above..."
  25.  
  26. call open(f1,"ram:Milles","R")
  27.   do i=1 until eof(f1) ; t.i=readln(f1) ; end i ; t=i-1
  28. call close(f1)
  29.  
  30. if t=0 then do
  31.   tr "n1No SAVED GAMES on file..." ; exit ; end
  32.  
  33. do i=1 to t
  34.   call open(f1,t.i,"R")
  35.     do j=1 until eof(f1) ; l.j=readln(f1) ; end j ; l=j-1
  36.   call close(f1)
  37.   tr "n1Converting> "t.i
  38.   if l.1=ver then do;tr "  Already in "ver" format.";iterate;end
  39.   se "  Updating Version Number..." ; l.1=ver ; tr "Done!"
  40.   se "  Adding Game Speed Value..."
  41.     parse var l.3 v1"|"v2"|"v3"|"v4"|"v5"|"v6"|"v7"|"v8"|"v9"|"v10"|x"
  42.       l.3=v1"|"v2"|"v3"|"v4"|"v5"|"v6"|"v7"|"v8"|"v9"|"v10"|0|x" ; tr "Done!"
  43.   se "  Adding CPU Extension Decision..."
  44.     do j=l-(v8-1) to l ; parse var l.j p1"|"p2"|"p3"|"p4
  45.       l.j=p1"|"p2"|"p3"|0|"p4 ; end j ; tr "Done!"
  46.   se "  Saving..."
  47.   call open(f1,t.i,"W")
  48.     do j=1 to l ; call writeln(f1,l.j) ; end j
  49.   call close(f1) ; tr "h6ed!"
  50. end i
  51.  
  52. tr "n1Issuing this last dos command:n2delete ram:Milles"
  53.  
  54. address command "delete ram:Milles"
  55.  
  56. tr "n1Update to v1.11 complete!"
  57.  
  58. exit
  59. CHECK:;if ARG() & ARG(1)~='###PANIC' then return ARG(1)
  60.   getcarrier;if result='TRUE' then if ARG() then return ARG(1);else return
  61.   logentry 'Lost Carrier!!';bufferflush;exit
  62. SYNTAX:;ERROR:;IOERR:;e1='n1 Error: 'rc' ('errortext(rc)')'
  63.   e2='  Line: 'left(sigl,4)'File:';gu 1311992;a=result;gu 1311960
  64.   b=result;c='"'a||b', 'ver'"';e2=e2' 'c;tr e1;tr e2;logentry e1
  65.   logentry e2;e=translate(sourceline(sigl),"\{","");do while e~=''
  66.   e3='Source: 'left(e,37);tr e3;logentry e3;e=substr(e,38);end;bufferflush
  67. /**************************************************************************\
  68. \****************************************** Frontiers BBS (716)/823-9892 **/
  69.